Skip to content

Conversation

@deanq
Copy link
Contributor

@deanq deanq commented Oct 16, 2025

No description provided.

deanq added 22 commits October 15, 2025 18:14
Enable container to serve different handlers based on HANDLER_MODULE
environment variable, with live_serverless as the default.

Changes:
- Add load_handler() function with dynamic import logic
- Support nested module paths (e.g., handlers.custom.module)
- Maintain backward compatibility (defaults to live_serverless)
- Add comprehensive error handling with clear messages
- Include 15 new tests (11 unit, 4 integration)
- Test coverage for error scenarios and module switching

Usage:
  HANDLER_MODULE=custom_handler python handler.py
Implement HANDLER_MODULE env var for handler selection and HandlerEvent
protocol for standardized event structure across all handlers.

- New: handler_protocol.py with HandlerEvent/HandlerFunction
- Dynamic import based on HANDLER_MODULE (default: live_serverless)
- Backward compatible dict-to-HandlerEvent coercion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants